#include "ALGConfiguration.h"
#include <stdlib.h>

//TODO testing
PalgConfiguration initAlgConfiguration(){
	PalgConfiguration result = malloc(sizeof(ALGConfiguration));
	checkMalloc(result, "ALGConfiguration.h:initAlgConfiguration:1");
	return result;
}

//TODO testing
void freeAlgConfiguration(PalgConfiguration obj){
	free(obj->constructiveDrawingPath);
	free(obj->graphPath);
	free(obj);
}

void printAlgConfiguration(FILE* f,PalgConfiguration obj){
	fprintf(f,"graphPath: \"%s\"\n",obj->graphPath);
	fprintf(f,"vehicle number: \"%d\"\n",obj->vehicleNumber);
	fprintf(f,"constructive Drawing Path: \"%s\"\n",obj->constructiveDrawingPath);
	fprintf(f,"draw solution BMP: \"%s\"\n",obj->drawSolutionBMP==1?"true":"false");
	fprintf(f,"draw solution OCTAVE: \"%s\"\n",obj->drawSolutionOctave==1?"true":"false");
	fprintf(f,"evaluate mode: \"%d\"\n",obj->evaluate);
	fprintf(f,"maximum iteration number: \"%lu\"\n",obj->maximumLOSIterationNumber);
	fprintf(f,"maximum worse iteration number: \"%lu\"\n",obj->maximumLOSWorseningIterationNumber);
	fprintf(f,"maximum STM iteration number: \"%d\"\n",obj->maximumSTMIterationNumber);
	fprintf(f,"add edge tenure: \"%d\"\n",obj->addEdgeTenure);
	fprintf(f,"remove edge tenure: \"%d\"\n",obj->removeEdgeTenure);
}
